package dao

import (
	"main/global"
	"main/internal/model"
)

func GetUserGiftByUserIdAndGiftId(userId uint, giftId uint) model.UserGift {
	var result model.UserGift
	if err := global.DB.Where("user_id = ? AND gift_id = ?", userId, giftId).Find(&result).Error; err != nil {
		return model.UserGift{}
	}
	return result
}
